﻿Imports System.Windows.Forms

Public Class DialogOptions

	Private Sub Save_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save_Button.Click
		Me.DialogResult = System.Windows.Forms.DialogResult.OK

		My.MySettings.Default.api_key = TextBoxOptionsAPI_Key.Text
		My.MySettings.Default.user_name = TextBoxOptionsUserName.Text
		My.MySettings.Default.secret = TextBoxOptionsSecret.Text

		Me.Close()
	End Sub

	Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
		Me.DialogResult = System.Windows.Forms.DialogResult.Cancel


		Me.Close()
	End Sub

	Private Sub DialogOptions_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
		TextBoxOptionsAPI_Key.Text = My.MySettings.Default.api_key
		TextBoxOptionsSecret.Text = My.MySettings.Default.secret
		TextBoxOptionsUserName.Text = My.MySettings.Default.user_name
	End Sub
End Class
